Triggering actions based on changes in a network connection

ABSTRACT

The described embodiments provide a system for performing an action based on a change in a status of a wired or wireless network connection for the system. During operation, the system detects the change in the status of the network connection. In response to detecting the change, the system determines a state of the system. The system then performs one or more actions using the determined state.

BACKGROUND

1. Field

The described embodiments relate to techniques for improving theperformance of electronic devices. More specifically, the describedembodiments relate to a method and apparatus for triggering actionsbased on changes in a network connection for an electronic device.

2. Related Art

Designers have continually increased the number of features which areavailable in portable electronic devices such as smart phones, laptops,and netbooks. Consequently, despite their being relatively small, manyof today's portable electronic devices provide many of the features ofdesktop computers from just a few years ago, yet also provide additionalfeatures that are unique to portable electronic devices. For example,many portable electronic devices provide network connectivity (e.g.,Bluetooth™ (from the Bluetooth SIG, Inc. of Bellevue, Wash., USA), WiFi,3G/4G networks, USB, Ethernet, etc.), full-featured Internet browsers,location-sensing services (e.g., global positioning systems, etc.),still and video cameras, media players, pressure/temperature/directionsensors, and many other features. These features enable portable devicesto provide a number of different services, including email, phone, textmessaging, instant messaging, communicating on social networks,location-based services such as travel route planning, Internetbrowsing, playing back media, and many others.

Unfortunately, because this large number of features has only recentlybecome available in portable electronic devices, designers have not yettaken advantage of many of the functions that could be performed usingcombinations of features in the devices.

SUMMARY

The described embodiments provide a system (e.g., system 100) forperforming an action based on a change in a status of a wired orwireless network connection for the system. During operation, the systemdetects the change in the status of the network connection. In responseto detecting the change, the system determines a state of the system.The system then performs one or more actions using the determined state.

In some embodiments, when detecting the change in status of the networkconnection, the system detects at least one of: (1) a disconnection fromor a reconnection to the network connection; (2) a change in a signalstrength of the network connection; (3) a change in a bandwidth of thenetwork connection; or (4) the ability or inability to communicate witha predetermined second system on the network connection.

In some embodiments, when determining the state of the system, thesystem requests one or more subsystems in the system to returninformation about the state of the system. In response to the request,the system receives information about the state of the system from thesubsystems. The system then records the information about the state ofthe system.

In some embodiments, when requesting the one or more subsystems toreturn information about the state of the system, the system requeststhe one or more subsystems to return information about one or more of apast, current, or projected future state of the system.

In some embodiments, the state of the system includes an internal stateof the system. In these embodiments, the requested information includesinformation sampled from at least one of internal hardware or softwaremonitors in the system.

In some embodiments, the state of the system includes an external stateof the system. In these embodiments, the requested information includesinformation sampled by one or more sensors in the system about at leastone of: (1) a geographical or physical location of the system; (2) alinear or angular velocity or acceleration of the system; (3) adirectional heading of the system; (4) a temperature external to thesystem; (5) a tilt or rotation of the system; (6) an atmosphericpressure external to the system; (7) an intensity of light external tothe system; (8) a level of sound external to the system; or (9) a time.

In some embodiments, when returning information about a projected futurestate of the system, the system acquires one or more current or priorsamples of information about a state of the system. The system thengenerates a projected future state of the system from the acquiredsamples.

In some embodiments, recording the information includes storing theinformation in at least one of a volatile memory or a non-volatilememory.

In some embodiments, when performing the action using the determinedstate, the system is configured to cause one or more subsystems in thesystem or one or more applications in the system to perform one or moreoperations using the determined state.

In some embodiments, when performing the action using the determinedstate, the system is configured to cause one or more other systems orone or more applications in the other systems to perform one or moreoperations using the determined state.

In some embodiments, the system is configured to wait a predeterminedtime before determining the state of the system.

In some embodiments, the system is configured to wait a predeterminedtime before performing at least one of the one or more actions.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 presents a block diagram of a system in accordance with thedescribed embodiments.

FIG. 2 presents a flowchart illustrating a process for performing anaction based on a network status change in accordance with the describedembodiments.

FIG. 3 presents a flowchart illustrating a process for using locationinformation to perform an action based on a change in a status of anetwork connection in accordance with the described embodiments.

FIG. 4 presents a flowchart illustrating a process for using locationinformation along with other information to perform an action based on achange in a status of a network connection in accordance with thedescribed embodiments.

FIG. 5 presents a flowchart illustrating a process for performing anaction based on the formation of a PAN with another device in accordancewith the described embodiments.

FIG. 6 presents a flowchart illustrating a process for performing anaction a predetermined time after a disconnection from a network inaccordance with the described embodiments.

In the figures, like reference numerals refer to the same figureelements.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled inthe art to make and use the described embodiments, and is provided inthe context of a particular application and its requirements. Variousmodifications to the described embodiments will be readily apparent tothose skilled in the art, and the general principles defined herein maybe applied to other embodiments and applications without departing fromthe spirit and scope of the described embodiments. Thus, the describedembodiments are not limited to the embodiments shown, but are to beaccorded the widest scope consistent with the principles and featuresdisclosed herein.

The data structures and code described in this detailed description aretypically stored on a computer-readable storage medium, which may be anydevice or medium that can store code and/or data for use by a computersystem. For example, in some embodiments the computer-readable storagemedium can include, but is not limited to, volatile memory (e.g.,synchronous dynamic random access memory (SDRAM)/double data-ratesynchronous dynamic random access memory (DDR SDRAM), dynamic randomaccess memory (DRAM), etc.), non-volatile memory (e.g., flash memory,solid-state drives, etc.), magnetic and optical storage devices such asdisk drives, magnetic tape, CDs (compact discs), DVDs (digital versatilediscs or digital video discs), or other media capable of storing codeand/or data.

The methods and processes herein described can be embodied as codeand/or data, which can be stored in a computer-readable storage mediumas described above. When a computer system reads and executes the codeand/or data stored on the computer-readable storage medium, the computersystem performs the methods and processes embodied as data structuresand code and stored within the computer-readable storage medium.

Furthermore, the methods and processes herein described can be includedin hardware modules. For example, the hardware modules can include, butare not limited to, application-specific integrated circuit (ASIC)chips, field-programmable gate arrays (FPGAs), and otherprogrammable-logic devices. When the hardware modules are activated, thehardware modules perform the methods and processes included within thehardware modules.

System

FIG. 1 presents a block diagram of system 100 in accordance with thedescribed embodiments. System 100 includes processing subsystem 102,memory subsystem 104, networking subsystem 106, and service subsystem108.

Processing subsystem 102 can include one or more devices configured toperform computational operations. For example, processing subsystem 102can include, but is not limited to, one or more microprocessors, ASICs,microcontrollers, or programmable-logic devices.

Memory subsystem 104 can include one or more devices for storing dataand/or instructions for processing subsystem 102, networking subsystem106, and/or service subsystem 108. For example, memory subsystem 104 caninclude DRAM, flash memory, and/or other types of memory. In addition,memory subsystem 104 can include mechanisms for controlling access tothe memory. In some embodiments, memory subsystem 104 includes a memoryhierarchy that includes an arrangement of one or more caches coupled toa memory for system 100.

In some embodiments, memory subsystem 104 is coupled to one or morehigh-capacity mass-storage devices (not shown). For example, memorysubsystem can be coupled to a magnetic or optical drive, a solid-statedrive, or another type of mass-storage device. In these embodiments,memory subsystem 104 can be used by system 100 as fast-access storagefor often-used data, while the mass-storage device is used to store lessfrequently used data.

Networking subsystem 106 can include one or more devices configured tocouple to and communicate on a wired and/or wireless network (i.e., toperform network operations). For example, networking subsystem 106 caninclude, but is not limited to, a Bluetooth™ networking system, acellular networking system (e.g., a 3G/4G network), a universal serialbus (USB) networking system, a networking system based on the standardsdescribed in Institute for Electrical and Electronic Engineers (IEEE)802.11 (interchangeably called “an 802.11 network”), an Ethernetnetworking system, or a wired or wireless personal-area networking (PAN)system (e.g., an infrared data association (IrDA), ultra-wideband (UWB),Z-Wave, or a network based on the standards described in IEEE 802.15).In some embodiments, networking subsystem 106 can include one or morehard-wired electrical connections (e.g., a 30-pin connector) that can beused for networking (and possibly for other purposes, such as providingexternal power to system 100).

Networking subsystem 106 can include controllers, radios/antennas,sockets/plugs for hard-wired electrical connections, and/or otherdevices used for coupling to, communicating on, and handling data andevents on a wired and/or wireless network. In some of these embodiments,networking subsystem 106 can include one or more mechanisms for formingan ad hoc network connection (e.g., an ad-hoc wireless PAN) with otherdevices.

Service subsystem 108 can include any device configured to perform oneor more services within system 100. Generally, service subsystem 108includes one or more functional blocks, components, circuits, elements,transducers, monitors, and/or sensors that can be used to perform theservices. (Note that, although in the following paragraphs we describeseveral services that can be provided by service subsystem 108, inalternative embodiments, service subsystem 108 can provide more and/ordifferent services.)

For example, service subsystem 108 can include one or morelocation-sensing systems. The location-sensing systems can include, butare not limited to, global positioning systems (GPS),cellular-phone-system-based location systems (e.g., cell-identification(cell-ID), cell-ID++, enhanced observable time difference (E-OTD),and/or 3G positioning), and/or WiFi position systems for determining ageographical location of system 100. In embodiments where servicesubsystem 108 includes two or more location-sensing systems, thelocation-sensing systems can be used separately, or can be used incombination to sense a location of system 100.

As another example, service subsystem 108 can include one or moresensing systems, each coupled to one or more sensors for sensingexternal and/or internal conditions for tracking a current, past, orprojected future state for system 100 (i.e., for processing subsystem102, memory subsystem 104, networking subsystem 106, and/or servicesubsystem 108 within system 100). For example, service subsystem 108 caninclude sensors such as accelerometers, compasses, tilt/rotationdetectors, thermometers, ambient light sensors, atmospheric pressuresensors (barometers), cameras, microphones, and/or timers/clocks.

As yet another example, service subsystem 108 can include one or moremonitoring systems coupled to internal hardware and/or software monitorsfor tracking a current, past, or projected future state for system 100.For example, service subsystem 108 can include, but is not limited to,monitors for tracking processing subsystem 102's workload, temperature,application profile (i.e., what applications are executing on processingsubsystem 102), and/or I/O activity. As another example, servicesubsystem 108 can include, but is not limited to, monitors for trackingthe networks available to networking subsystem 106, or networkingsubsystem 106's connectivity and/or bandwidth usage.

As still another example, service subsystem 108 can include one or morelogging services for logging a state of system 100. In some embodiments,each logging service can be configured to record events and data fromone or more of the services provided by service subsystem 108. Forexample, assuming that service subsystem 108 includes a location-sensingsystem, the logging service can be configured to capture locationinformation from the location-sensing system and log the information. Insome embodiments, the service subsystem 108 can be configured to storethe logged state in memory subsystem 104 (including storing the loggedstate in non-volatile storage, so that the state is maintained if apower supply for system 100 is turned off or lost).

In the embodiments that track a projected future state for system 100,service subsystem 108 can automatically sample a state of system 100 ata predetermined interval. Service subsystem 108 can then project afuture state for system 100 based on a predetermined number of priorsamples. For example, if a temperature of system 100 has been 75° F.over a prior 12 samples at 10-minute intervals, service subsystem 108can project that the temperature of system 100 will remain 75° for anext sample.

Within system 100, processing subsystem 102, memory subsystem 104,networking subsystem 106, and service subsystem 108 are coupled togetherusing bus 110. Bus 110 is an electrical connection between thesubsystems that the separate subsystems can use to communicate commandsand data among one another. Note that, although we show only one bus 110for clarity, different embodiments can include a different number orconfiguration of electrical connections between the subsystems.

In some embodiments, bus 110 is a packet bus and communication among thesubsystems involves sending command and data packets in predeterminedformats on bus 110. In alternative embodiments, bus 110 includes one ormore dedicated signal lines and communication between the subsystemsinvolves signaling the subsystems on the one or more dedicated signallines.

Although shown as separate subsystems in FIG. 1, in some embodiments,some or all of a given subsystem can be integrated into one or more ofthe other subsystems in system 100. For example, in some embodiments,service subsystem 108 can be partially integrated into processingsubsystem 102, networking subsystem 106, and/or memory subsystem 104. Inother words, in these embodiments, each of the subsystems may containfunctional block(s), circuits, etc., for performing some or all of oneor more services. Although alternative embodiments can be configured inthis way, for clarity we describe embodiments where each of thesubsystems is separate from the other subsystems.

System 100 can be incorporated into many different types of electronicdevices. Generally, these electronic devices include any device that canperform an action based on a change in a network status. For example,system 100 can be part of a desktop computer, a laptop computer, aserver, a media player, an appliance, a subnotebook/netbook, a cellularphone, a piece of testing equipment, a network appliance, a personaldigital assistant (PDA), a smart phone, a toy, a controller, or anotherdevice.

Although we use specific components to describe system 100, inalternative embodiments, different components and/or subsystems may bepresent in system 100. For example, system 100 may include one or moreadditional processing subsystems 102, memory subsystems 104, networkingsubsystems 106, and/service subsystems 108. Alternatively, one or moreof the subsystems may not be present in system 100.

In some embodiments, system 100 may include one or more additionalsubsystems that are not shown in FIG. 1. For example, system 100 caninclude, but is not limited to, a display subsystem for displayinginformation on an included display, a data collection subsystem forcollecting data from an external system, an audio subsystem, an alarmsubsystem, a media processing subsystem, and/or an input/output (I/O)subsystem to enable a user (or another system) to input data andcommands into system 100 and to receive information from system 100.

Detecting a Status Change for a Network Connection

Recall that in the described embodiments, networking subsystem 106 caninclude a Bluetooth™ networking system, a USB networking system, an802.11 networking system, an Ethernet networking system, a wired orwireless PAN system, and/or another type of wired or wireless networkingsystem. In the described embodiments, networking subsystem 106 useswell-known operations for a given network type to couple (i.e., connect)to the network, to send data on the network, and to uncouple (i.e.,disconnect) from the network.

More specifically, in these embodiments, using events and/or signalsassociated with a given network type, networking subsystem 106 candetect when a change has occurred in a status of an associated networkconnection and send an event notification or signal to one or more ofthe other subsystems to indicate the change. For example, when a networkconnection is established, terminated, or lost, networking subsystem 106can signal one or more of the other subsystems that the change hasoccurred.

In addition, in some embodiments, when a given network connectionchanges status in other predetermined ways, such as bandwidthavailability, network provider, or signal strength, networking subsystem106 can detect the change and signal one or more of the other subsystemsthat the status change has occurred. For example, if the bandwidth for anetwork connection transitions from full availability to restrictedavailability, networking subsystem 106 can detect the transition andsignal the transition to the other subsystems. In addition, in some ofthese embodiments, networking subsystem 106 can detect an ability orinability to communicate with a particular other system on the networkconnection.

In some embodiments, networking subsystem 106 forwards eventnotifications or signals associated with status change for a givennetwork type to the other subsystem(s) to signal the change in status.For example, assuming that networking subsystem 106 is coupled to aBluetooth™ network, upon losing the Bluetooth™ network connection (e.g.,upon moving too far from the Bluetooth™ network to remain coupled to thenetwork), a Bluetooth™ disconnection event can be generated bynetworking subsystem 106 and forwarded to one or more of the othersubsystems to signal that the Bluetooth™ connection was lost.

Recall also that in some embodiments networking subsystem 106 includes ahard-wired connection (e.g., a 30-pin connector or an Ethernetconnection) that can be used for coupling to a network. In theseembodiments, upon the hard-wired connection being disconnected or thesignal on the hard-wired connection being lost, a signal can begenerated from networking subsystem 106 to one or more of the othersubsystems to indicate that the hard-wired connection is no longerfunctional. For example, assuming an embodiment where system 100 iscoupled to a 30-pin connector, upon system 100 detecting that the 30-pinconnector has lost power (e.g., has been disconnected or remainsconnected, but has lost electrical power), networking subsystem 106 cansend a signal to notify one or more of the other subsystems of the powerloss.

Performing an Action Based on a Network Status Change

The described embodiments can perform one or more actions based on astatus change in a network connection. Generally, this can involvenetworking subsystem 106 detecting a change in the status of a givennetwork connection and then sending a signal to one or more of thesubsystems in system 100 to notify the subsystems of the status change.Upon receiving the signal indicating the status change of the networkconnection, one or more of the subsystems can perform the one or moreactions. In some embodiments, performing the actions can involverecording information about a past, current, or predicted future stateof system 100 and then using the recorded information to perform the oneor more actions.

Note that in the following description, for clarity and brevity, wesometimes describe system 100 generally as performing network operationsand actions. Although we describe the embodiments in this way, one ormore of the subsystems shown in FIG. 1 can be performing some or all ofthe network operations and/or the actions.

FIG. 2 presents a flowchart illustrating a process for performing anaction based on a network status change in accordance with the describedembodiments. The process starts when networking subsystem 106 in system100 determines that a status change has occurred for a networkconnection (step 200).

For example, assuming an embodiment where networking subsystem 106includes one or more mechanisms for coupling to and communicating on aWiFi network and a Bluetooth™ network, and also includes a 30-pinhard-wired connector for coupling system 100 to a network, networkingsubsystem 106 can determine that a WiFi, Bluetooth™, or 30-pinconnection has been established, lost, terminated, interrupted, haschanged in signal strength a predetermined amount, or has otherwisechanged in status.

Networking subsystem 106 then signals one or more of the subsystems insystem 100 that the change in status for the network connection hasoccurred. For example, using the embodiment described with respect tostep 200 (which we will use in describing all the operations in FIG. 2),networking subsystem 106 can signal a change in the status of the WiFi,Bluetooth™, or 30-pin connector to processing subsystem 102, memorysubsystem 104, networking subsystem 106, and/or service subsystem 108.

Based on the received signal, one or more of the subsystems can recordstate information about system 100 (step 202). In the describedembodiments the state information can include information about a past,current, or projected future internal and/or external state of system100. The internal state information can include any state informationregarding a state of system 100, including state information gatheredfrom hardware or software monitors in system 100. The external stateinformation can include any state information external to system 100,such as information gathered by one or more location-sensing devices,sensors, network devices, or transducers. In some embodiments, theinformation can include information received from other systems (i.e.,systems external to system 100).

In the described embodiments, the recorded state information can begathered by one of the subsystems from one or more of the othersubsystems.

For example, assuming that networking subsystem 106 signaled a WiFi,Bluetooth™, or 30-pin connector disconnect event to processing subsystem102, processing subsystem 102 can query service subsystem 108 forinformation about an internal or external state of system 100. Moreover,processing subsystem 102 can query memory subsystem 104, networkingsubsystem 106, and/or internal structures in processing subsystem 102for stored information about an internal or external state of system100.

As described above, in some embodiments, the information can includeinformation about a current, a prior, or a projected future state ofsystem 100. In some embodiments, processing subsystem 102 can generate aprojected future state of system 100 using a combination of recordedstate information from memory subsystem 104 and current stateinformation. In alternative embodiments, system 100 can use sampledstate information to keep a projected future state available (i.e., inmemory).

The subsystems then perform one or more actions using the recorded stateinformation (step 204). For example, assuming an embodiment wherenetworking subsystem 106 signals processing subsystem 102 upon detectinga WiFi, Bluetooth™, or 30-pin connector coupling event, processingsubsystem 102 can request internal and/or external state informationfrom service subsystem 108. Using the state information, processingsubsystem 102 can then perform the one or more actions.

Exemplary Embodiments

As described above, upon receiving a signal indicating a status changeof a network connection, one or more of the subsystems can recordinformation about a past, current, or predicted future state of system100 and then can use the recorded information to perform the one or moreactions. For example, assume an embodiment where system 100 is part of asmart phone in which service subsystem 108 includes one or morelocation-sensing systems (i.e., the smart phone is “location-aware”),and in which networking subsystem 106 supports a Bluetooth™ networkconnection. In this embodiment, upon losing a connection to a Bluetooth™network (i.e., a “status change” in the Bluetooth™ network connection),networking subsystem 106 can signal processing subsystem 102 that thenetwork connection has been lost. Processing subsystem 102 can then useexternal and/or internal state information from system 100 to perform anaction associated with losing the Bluetooth™ network connection.

For example, in some of these embodiments, upon receiving notice of achange in network status, processing subsystem 102 can query servicesubsystem 108 for a current location of the smart phone. Upon receivinginformation about the location from service subsystem 108, processingsubsystem 102 can record the location. Processing subsystem 102 can thenuse the recorded information for performing an action such as placing apin on a map using a map application. For an embodiment where system 100was coupled to a Bluetooth™ network in a car until the car wasparked/turned off and the Bluetooth™ connection was lost, thisembodiment can potentially assist a user in later finding the locationwhere the car was parked, can send location information to roadsideassistance, or can perform another operation.

FIG. 3 presents a flowchart illustrating a process for using locationinformation to perform an action based on a change in a status of anetwork connection in accordance with the described embodiments. For theexample shown in FIG. 3, we assume a location-aware portable electronicdevice (e.g., a laptop, a smart phone, etc.) including a system 100 thatwirelessly connects to a Bluetooth™ wireless network in a user's car.

As shown in FIG. 3, the process starts when the portable electronicdevice wirelessly connects to the Bluetooth™ network in the user's car(step 300). In some embodiments, a notification of the connection ispassed from networking subsystem 106 to processing subsystem 102, andprocessing subsystem 102 begins to monitor the Bluetooth™ connection(i.e., the connection to the Bluetooth™ wireless network) for adisconnect event. In other embodiments, processing subsystem 102 doesnot monitor the Bluetooth™ connection, but instead detects disconnectionevents for the Bluetooth™ connection as they occur.

The portable electronic device then determines that the Bluetooth™connection has been disconnected or otherwise lost (step 302). In someembodiments, networking subsystem 106 in the portable electronic devicedetects that the Bluetooth™ connection has been disconnected orotherwise lost. Upon detecting that the Bluetooth™ connection has beenlost, networking subsystem 106 forwards a signal to processing subsystem102 to notify processing subsystem 102 that the Bluetooth™ connectionhas been lost.

Processing subsystem 102 then sends a request to service subsystem 108to provide a current location for the portable electronic device (step304). In response, service subsystem 108 captures a current location ofthe portable electronic device using a GPS system, a position trackingsystem, or another location sensing mechanism. The captured location isthen forwarded to processing subsystem 102 and recorded (step 306).Processing subsystem 102 then uses the recorded location information toplace a pin on a map using a map application (step 308).

As another example, in some of these embodiments, upon receiving anindication from networking subsystem 106 that the Bluetooth™ connectionhas been lost, processing subsystem 102 can record the location wherethe connection was lost. The recorded information can be used to informa user that he or she is leaving an area of the network (which can havebeen defined by the user or system 100 earlier). For an embodiment wheresystem 100 was coupled to a Bluetooth™ network in a laptop, this canhelp to remind a user to secure the laptop before traveling too far fromthe laptop.

As yet another example, assume an embodiment where system 100 is part ofa smart phone in which service subsystem 108 includes one or morelocation-sensing systems and one or more accelerometers, and in whichnetworking subsystem 106 supports a Bluetooth™ network connection and ahard-wired connection (e.g., a 30-pin connection). In this embodiment,system 100 can detect that a hard-wired connection has lost power orthat a Bluetooth™ network connection has been lost, and that a velocityat which system 100 was traveling has fallen from 65 mph to zero in afew seconds (using recorded current and prior state information forsystem 100). From this, system 100 can determine that a car accident mayhave occurred. System 100 can then perform actions such as sounding analarm to a user that system 100 has determined that an accident may havehappened to give the user a chance to cancel the action before system100 alerts an outside party (e.g., a roadside assistance service or theauthorities). In this embodiment, other information recorded about thestate of system 100, such as time, traveling speed over a previous timeinterval, and/or location (i.e., on a highway) can be used tocorroborate the determination.

FIG. 4 presents a flowchart illustrating a process for using locationinformation along with other information to perform an action based on achange in a status of a network connection in accordance with thedescribed embodiments. For the example shown in FIG. 4, we assume alocation-aware portable electronic device (e.g., a laptop, a smartphone, etc.) including a system 100 that electrically connects to ahard-wired connector in a user's car for recharging a battery in theelectronic device and for networking

As shown in FIG. 4, the process starts when the portable electronicdevice is electrically connected to the hard-wired connection in theuser's car (step 400). In some embodiments, a notification of theconnection is passed from networking subsystem 106 to processingsubsystem 102, and processing subsystem 102 begins to monitor thehard-wired connection for a disconnect event. More specifically,processing subsystem 102 can monitor the delivery of electrical powerthrough the hard-wired connection for possible losses of power. In otherembodiments, processing subsystem 102 does not monitor the hard-wiredconnection, but instead detects losses of power for the hard-wiredconnection as they occur.

The portable electronic device then determines that the hard-wiredconnection has been disconnected or otherwise lost power (step 402). Insome embodiments, networking subsystem 106 in the portable electronicdevice detects that the hard-wired connection has been disconnected orotherwise lost power. Upon detecting that the hard-wired connection haslost power, networking subsystem 106 forwards a signal to processingsubsystem 102 to notify processing subsystem 102 that the hard-wiredconnection has lost power.

Processing subsystem 102 then signals service subsystem 108 to provide acurrent location for the portable electronic device (step 404). Inresponse, service subsystem 108 captures a current location of theportable electronic device using a GPS system, a position trackingsystem, or another location sensing mechanism and forwards the locationinformation to processing subsystem 102.

In addition, processing subsystem 102 signals service subsystem 108 toprovide acceleration information for a predetermined time period aroundthe time when the electrical connection for the hard-wired connectionwas lost (step 406). Note that these embodiments can periodically recordacceleration and/or velocity and/or can detect acceleration ordeceleration, including changes in velocity of greater than apredetermined amount in a given time (i.e., a change in velocity from 65mph to 0 mph in less than 2 seconds). Providing the accelerationinformation can involve providing information about any deceleration fora short time before the loss of power until a short time after the lossof power. For example, 1-2 seconds before the loss of power to 1-2seconds after the loss of power.

The captured location information and acceleration information is thenrecorded (step 408). Next, processing subsystem 102 determines if therecorded location information and acceleration information indicate thata car accident may have occurred (step 410). System 100 can then soundor display an alarm to a user that system 100 has determined that anaccident may have happened to give the user a chance to cancel theaction before system 100 alerts an outside party (e.g., a roadsideassistance service or the authorities) (step 412). As described above,in this embodiment, other information recorded about the state of system100, such as time, traveling speed over a previous time interval, and/orlocation (i.e., on a highway) can be used to corroborate thedetermination.

As a further example, assume an embodiment where system 100 is part of anetbook in which service subsystem 108 and/or processing subsystem 102includes one or more mechanisms for providing location-sensing andpersonal contact management (i.e., phone/address contacts in memorysubsystem 104), and that networking subsystem 106 includes one or moremechanisms for forming an ad hoc PAN with other nearby similarlyequipped devices. In these embodiments, upon encountering another devicethat supports forming a PAN, networking subsystem 106 can form a PANwith the other device. Networking subsystem 106 can then signalprocessing subsystem 102 that the PAN has been formed. Processingsubsystem 102 can then use information returned from one of the othersubsystems (e.g., service subsystem 108 or memory subsystem 104) toperform associated actions. For example, processing subsystem 102 canupload or download predetermined information (i.e., public contact oridentity information, schedule information, etc.) to or from the otherdevice, can provide location-based information to the other device, orcan perform another service.

In some embodiments, system 100 can perform further actions based on theidentity of the user of a device with which the PAN is formed and/orbased on the internal or external state of system 100 or the otherdevice. For example, system 100 can determine that a PAN has been formedwith another device and can retrieve public identity information fromthat device. If the device belongs to a known contact, system 100 canperform actions such as alerting the user to the presence of the person,turning down music, exchanging files intended for that person, orperforming another operation.

FIG. 5 presents a flowchart illustrating a process for performing anaction based on the formation of a PAN with another electronic device inaccordance with the described embodiments. For the example shown in FIG.5, we assume a portable electronic device (e.g., a laptop, a smartphone, etc.) including system 100 that forms ad hoc PANs with othersimilarly-equipped electronic devices. In addition, we assume a portableelectronic device that can be configured to exchange selectedinformation about the identity of the user of the portable electronicdevice and the identity of the user for other devices with which theportable electronic device forms PANs.

As shown in FIG. 5, the process starts when the portable electronicdevice forms a PAN with another similarly-equipped electronic device(step 500). For example, a smart phone can form a PAN with a secondsmart phone, a kiosk in the mall, a laptop or desktop computer, asecurity system, etc. In these embodiments, the PAN can be formed bynetworking subsystem 106 using techniques known in the art.

Upon detecting that the PAN has been formed, networking subsystem 106forwards a notification to processing subsystem 102. Processingsubsystem 102 then retrieves identity information from the otherelectronic device (step 502). For example, one or both devices can besmart phones that are configured to provide selected user identityinformation to devices with which PANs are formed. In these embodiments,when the PAN is formed, a processing subsystem 102 in each device cancause the devices to exchange the user identity information with oneanother (or can cause the electronic device to receive identityinformation from the other device without sending identity informationto the other device). Processing subsystem 102 then records the identityinformation from the other device (step 504).

Processing subsystem 102 then determines if the user is a user for whichan action is associated or for which processing subsystem 102 isconfigured to perform an action. For example, processing subsystem 102can be configured to alert the user to the presence of the other person,turn down music when someone is at the door, exchange files intended forthat person, or perform another operation. If so, based on the recordedidentity information, processing subsystem 102 performs the actionassociated with the user (step 506).

In some embodiments, system 100 performs one or more actions immediatelyupon receiving the notification of the change in status of the networkconnection from networking subsystem 106. For example, assume thatsystem 100 is in a location-aware cellular phone that includes a service(e.g., an application) for determining street traffic levels. In thisembodiment, a Bluetooth™ network connection to a user's car can bedetermined to have been made by system 100 (using a network for the car,a time of coupling, etc.). System 100 can then immediately perform theaction of checking a volume of traffic on a predetermined route (e.g.,to work) to determine if an alarm should be signaled to the user toenable the user to take an alternate route due to heavy traffic on theroute.

In some embodiments, system 100 performs one or more actions apredetermined time after receiving the notification of the change instatus of the network connection from networking subsystem 106. In someof these embodiments, the information can be recorded immediately, butthe action can be performed later.

For example, assume that the system 100 is in a laptop computer that theuser typically disconnects from a first wireless network at home andwirelessly connects to a second wireless network at work 30 minuteslater. In this embodiment, system 100 can detect the disconnect eventfrom the home wireless network then and perform a check for a connectionto the work wireless network 30 minutes later. If a connection to thework network is not made by the time the check occurs, system 100 canperform actions such as enabling a predetermined locking sequence (e.g.,setting a predetermined password), securing sensitive data, locking harddrives, and/or disabling or otherwise limiting system capabilities. Asanother example, assuming the same laptop, system 100 can periodicallycheck to see if a connection to, or a disconnection from, a givennetwork has occurred in a predetermined amount of time (e.g., 1 hour, 1day, 1 week, etc.). If not, one or more associated actions can beperformed.

FIG. 6 presents a flowchart illustrating a process for performing anaction a predetermined time after a disconnection from a network inaccordance with the described embodiments. For the example shown in FIG.6, we assume a laptop computer that includes a system 100 that can beconfigured to form wireless (e.g., IEEE 802.11 or Bluetooth™) networkconnections with wireless networks in a home and at work.

As shown in FIG. 6, the process starts when the laptop computer isdisconnected from a home wireless network (step 600). In someembodiments, networking subsystem 106 determines that a wirelessconnection to the home wireless connection has been lost and forwards anotification to processing subsystem 102.

A predetermined time after receiving the notification that the wirelessconnection was lost, processing subsystem 102 queries networkingsubsystem 106 to determine if a wireless network connection has beenformed with a wireless network at work (step 602). For example,processing subsystem 102 can be configured to make the connectivityquery to networking subsystem 106 one week later, one day later, onehour later, or a different time later. (Note that in these embodiments,the laptop computer detects a disconnection event for the home wirelessnetwork, but does not perform the resulting action of checking for theconnection to the work wireless network until the predetermined timelater.)

If networking subsystem 106 returns an affirmation that the wirelessconnection has been formed with the wireless network at work, theprocess is complete. Otherwise, if networking subsystem 106 indicatesthat the wireless connection has not been formed with the wirelessnetwork at work, processing subsystem can perform one or more operationsfor securing the computer against possible theft or loss (step 604). Forexample, in these embodiments, processing subsystem 102 can secure harddrives, I/O devices (e.g., monitor, mouse, or keyboard), the operatingsystem, or selected programs using a predetermined password or aphysical key, can encrypt, conceal, or destroy sensitive data, can sendan email/text message/instant message to inform security personnel orthe user that the laptop may be stolen or lost, and/or can performanother action. Alternatively, processing subsystem 102 can alert theuser that these operations will be performed unless a particularpassword is entered and/or unless the laptop is connected to one of thewireless systems before a certain time has passed.

Note that although we refer to particular networks in these examples,alternative embodiments use different types of networks. For example,some embodiments use Ethernet networks or other wired or wirelessnetworks.

In addition to performing the action a predetermined time later in theseembodiments, in some embodiments, system 100 can perform one or moreactions immediately upon receiving a notification of a change in networkstatus and can then perform one or more additional actions apredetermined time after receiving the notification.

In some embodiments, upon detecting a connection to a given network,system 100 can perform actions using or in combination with anotherdevice that is coupled to the network. For example, assuming that a homewireless system is coupled to a system that controls a heating system inthe home, upon determining that a connection has been established withthe home wireless network, system 100 can query the system that controlsthe heating system to find out a temperature of the home. If thetemperature falls outside a preferred range, system 100 can prompt auser to activate the heating system, or can automatically activate theheating system.

In some embodiments, the above-described network connection statuschange detection and performance of actions is achieved using functionalblocks in one or more of the subsystems in system 100. In other words,the status change can be detected and the actions can be performed byhardware blocks, circuits, and/or elements. In these embodiments, system100 does not interact with an operating system or applications that maybe running on processing subsystem 102 when performing the action(s). Insome of these embodiments, errors in the operating system and/orapplications (including maliciously generated errors) do not prevent theaction from being taken.

Note that although we describe a number of network status changes,information that is recorded in response, and actions to be taken by agiven electronic device, persons of skill in the art can use the hereindescribed principles with different network status changes, informationrecorded in response, and actions taken without departing from thespirit of the disclosed embodiments.

Configuring Actions

In some embodiments, a user can manually configure system 100 to performa given action when a predetermined network change in status occurs. Forexample, assuming that system 100 is used in a location-aware netbook, auser can configure system 100 so that when a Bluetooth™ networkconnection is lost at a given time and/or location, or when a connectionto a given network is established or lost, system 100 awakes from alow-power state, records a current location, makes selected personalcontact information available to other devices via the network, opens anumber of user applications (email, remote login, etc.), and/or performsone or more other actions.

In some embodiments, system 100 can dynamically configure actions to beperformed based on changes in network status. In these embodiments,system 100 can record user behavior or other operations associated withchanges in network status and can use the recorded behavior oroperations to determine actions to be performed when a similar changeoccurs in the future. In some of these embodiments, system 100 canconfigure the actions automatically. In other embodiments, system 100can prompt a user to configure the actions.

For example, upon detecting disconnection from a wireless network orfrom a hard-wired connection, system 100 can record an internal andexternal state of system 100, and can record actions taken by a userusing system 100 for a predetermined time. For example, upondisconnecting from a Bluetooth™ network connection, system 100 candetermine a current time, a temperature, a set of applications accessedby the user on system 100, a location of system 100, and other internalor external states for the system 100. System 100 can then analyze therecorded user behavior to determine actions to be taken if the samechange in the network status occurs in the future.

For example, assuming that system 100 is used in a cellular phone,system 100 can determine that a user in a particular location alwayssets a ringer volume to a higher level and/or silences the ringer upondisconnecting from a Bluetooth™ network in his or her car at location A(e.g., work) at 8:00 AM each morning. Based on this determination,system 100 can configure an action to occur each time the same networkchange in status occurs.

The foregoing descriptions of embodiments have been presented only forpurposes of illustration and description. They are not intended to beexhaustive or to limit the embodiments to the forms disclosed.Accordingly, many modifications and variations will be apparent topractitioners skilled in the art. Additionally, the above disclosure isnot intended to limit the embodiments. The scope of the embodiments isdefined by the appended claims.

1. A method for performing an action based on a change in a status of awired or wireless network connection for a system, comprising: detectingthe change in the status of the network connection; and in response todetecting the change in the status: determining a state of the system;and performing one or more actions using the determined state.
 2. Themethod of claim 1, wherein detecting the change in status includesdetecting at least one of: a disconnection from or a reconnection to thenetwork connection; a change in a signal strength of the networkconnection; a change in a bandwidth of the network connection; or anability or inability to communicate with a predetermined second systemon the network connection.
 3. The method of claim 1, wherein determiningthe state of the system involves: requesting one or more subsystems inthe system to return information about the state of the system; inresponse to the request, receiving information about the state of thesystem from the subsystems; and recording the information about thestate of the system.
 4. The method of claim 3, wherein requesting theone or more subsystems to return information about the state of thesystem includes requesting the one or more subsystems to returninformation about one or more of a past, current, or projected futurestate of the system.
 5. The method of claim 3, wherein the state of thesystem includes an internal state of the system, and wherein therequested information includes information sampled from at least one ofinternal hardware or software monitors in the system.
 6. The method ofclaim 3, wherein the state of the system includes an external state ofthe system, and wherein the requested information includes informationsampled by one or more sensors in the system about at least one of: ageographical or physical location of the system; a linear or angularvelocity or acceleration of the system; a directional heading of thesystem; a temperature external to the system; a tilt or rotation of thesystem; an atmospheric pressure external to the system; an intensity oflight external to the system; a level of sound external to the system;or a time.
 7. The method of claim 3, wherein returning information abouta projected future state of the system involves: acquiring one or morecurrent or prior samples of information about a state of the system; andgenerating a projected future state of the system from the acquiredsamples.
 8. The method of claim 3, wherein recording the informationincludes storing the information in at least one of a volatile memory ora non-volatile memory.
 9. The method of claim 1, wherein performing theaction using the determined state includes at least one of: causing oneor more subsystems in the system or one or more applications in thesystem to perform one or more operations using the determined state; orcausing one or more other systems or one or more applications in theother systems to perform one or more operations using the determinedstate.
 10. The method of claim 1, wherein determining the state of thesystem further comprises waiting a predetermined time after detectingthe change in the status of the network connection before determiningthe state of the system.
 11. The method of claim 1, wherein performingthe one or more actions using the determined state further compriseswaiting a predetermined time after determining a state of the systembefore performing at least one of the one or more actions.
 12. Themethod of claim 1, wherein: detecting the change in the status of thenetwork connection comprises detecting a loss of a connection to a wiredor wireless network; determining a state of the system comprisesdetermining a physical location of the system; and performing one ormore actions using the determined state comprises: recording thedetermined physical location; and using the recorded location to place amarker on a map in a map application.
 13. The method of claim 1,wherein: detecting the change in the status of the network connectioncomprises detecting a loss of a connection to a wired or wirelessnetwork; determining a state of the system comprises determining: aphysical location of the system, and an acceleration of the systemwithin a predetermined time of the loss of the connection to the wiredor wireless network; and performing one or more actions using thedetermined state comprises: recording the determined physical locationand acceleration; and using the recorded location and acceleration todetermine if the system may have been involved in an accident.
 14. Themethod of claim 1, wherein: detecting the change in the status of thenetwork connection comprises detecting a formation of a personal areanetwork with another system; determining a state of the systemcomprises: receiving user identity information from the other system,and determining that the system is to perform one or more actionsassociated with the identified user of the other system; and performingone or more actions using the determined state comprises performing theone or more actions associated with the identified user of the othersystem.
 15. The method of claim 1, wherein: detecting the change in thestatus of the network connection comprises detecting a loss of aconnection to a first wired or wireless network; determining a state ofthe system comprises waiting a predetermined time and then determiningwhether a wired or wireless connection has been made to a second wiredor wireless network; and when a wired or wireless connection has notbeen made to the second wired or wireless network, performing one ormore actions using the determined state comprises performing one or moreoperations to notify a user that the wired or wireless connection hasnot been made or to secure the system against theft.
 16. An apparatusfor performing an action based on a change in a status of a wired orwireless network connection in a system, comprising: a networkingsubsystem coupled to the network connection; a processing subsystemcoupled to the networking subsystem; and a service subsystem coupled tothe processing subsystem; wherein upon detecting the change in thestatus of the network connection, the networking subsystem is configuredto send a signal to the processing subsystem to notify the processingsubsystem that the change has occurred; wherein upon receiving thesignal from the networking subsystem, the processing subsystem isconfigured to request state information for the system from the servicesubsystem; and wherein upon receiving the requested state informationfrom the service subsystem, the processing subsystem is configured toperform one or more actions using the state information.
 17. Theapparatus of claim 16, wherein when detecting the change in the statusof the network connection, the networking subsystem is configured todetect at least one of: an establishment, loss, or termination of thenetwork connection; or a change in a signal strength or bandwidth of thenetwork connection.
 18. The apparatus of claim 16, wherein whenrequesting state information from the service subsystem, the processingsubsystem is configured to request information about at least one of aprior, current, or estimated future state of the system.
 19. Theapparatus of claim 18, further comprising one or more hardware orsoftware monitors coupled to the service subsystem, wherein the one ormore hardware or software monitors are configured to monitor an internalstate of the system; wherein when requesting state information, theprocessing subsystem is configured to request internal state informationacquired from one or more of the hardware or software monitors.
 20. Theapparatus of claim 18, further comprising one or more sensors coupled tothe service subsystem, wherein the one or more sensors are configured tomonitor an external state of the system including at least one of: ageographical or physical location of the system; a linear or angularvelocity or acceleration of the system; a directional heading of thesystem; a temperature external to the system; a tilt or rotation of thesystem; an atmospheric pressure external to the system; an intensity oflight external to the system; a level of sound external to the system;or a time; and wherein when requesting state information, the processingsubsystem is configured to request external state information acquiredfrom the one or more sensors.
 21. The apparatus of claim 16, whereinwhen performing the action using the state information, the processingsubsystem is configured to at least one of: perform one or moreoperations using the state information; cause one or more of the othersubsystems to perform one or more operations using the stateinformation; or cause one or more other systems to perform one or moreoperations using the state information.
 22. The apparatus of claim 16,wherein the processing subsystem is configured to wait a predeterminedtime after receiving the signal from the networking subsystem beforerequesting state information for the system.
 23. The apparatus of claim12, wherein the processing subsystem is configured to wait apredetermined time after receiving the state information beforeperforming at least one of the one or more actions.
 24. An electronicdevice for performing an action based on a change in a status of a wiredor wireless network connection, comprising: a networking subsystemcoupled to the network connection; a processing subsystem coupled to thenetworking subsystem; a service subsystem coupled to the processingsubsystem; and a memory subsystem coupled to the processing subsystem,wherein the processing subsystem is configured to store data using thememory subsystem; wherein upon detecting the change in the status of thenetwork connection, the networking subsystem is configured to send asignal to the processing subsystem to notify the processing subsystemthat the change has occurred; wherein upon receiving the signal from thenetworking subsystem, the processing subsystem is configured to requeststate information for the system from the service subsystem; and whereinupon receiving the requested state information from the servicesubsystem, the processing subsystem is configured to perform one or moreactions using the state information.
 25. The electronic device of claim24, wherein when detecting the change in the status of the networkconnection, the networking subsystem is configured to detect at leastone of: an establishment, loss, or termination of the networkconnection; or a change in a signal strength or bandwidth of the networkconnection.
 26. The electronic device of claim 24, wherein whenrequesting state information from the service subsystem, the processingsubsystem is configured to request information about at least one of aprior, current, or estimated future state of the system.
 27. Theelectronic device of claim 26, further comprising one or more hardwareor software monitors coupled to the service subsystem, wherein the oneor more hardware or software monitors are configured to monitor aninternal state of the system; wherein when requesting state information,the processing subsystem is configured to request internal stateinformation acquired from one or more of the hardware or softwaremonitors.
 28. The electronic device of claim 26, further comprising oneor more sensors coupled to the service subsystem, wherein the one ormore sensors are configured to monitor an external state of the systemincluding at least one of: a geographical or physical location of thesystem; a linear or angular velocity or acceleration of the system; adirectional heading of the system; a temperature external to the system;a tilt or rotation of the system; an atmospheric pressure external tothe system; an intensity of light external to the system; a level ofsound external to the system; or a time; and wherein when requestingstate information, the processing subsystem is configured to requestexternal state information acquired from the one or more sensors. 29.The electronic device of claim 24, wherein the processing subsystem isconfigured to record the state information in at least one of a volatilememory or a non-volatile memory in the memory subsystem.
 30. Theelectronic device of claim 24, wherein when performing the action usingthe state information, the processing subsystem is configured to atleast one of: perform one or more operations using the stateinformation; cause one or more of the other subsystems to perform one ormore operations using the state information; or cause one or more othersystems to perform one or more operations using the state information.31. The electronic device of claim 24, wherein the processing subsystemis configured to wait a predetermined time after receiving the signalfrom the networking subsystem before requesting state information forthe system.
 32. The electronic device of claim 24, wherein theprocessing subsystem is configured to wait a predetermined time afterreceiving the state information before performing at least one of theone or more actions.